/**
 * 
 * @author  phoenics@126.com
 * @version v.0.1
 * @date  2018年4月29日 下午8:49:02 
 * 
 */
package phoenics.upservice.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import phoenics.upservice.entity.Project;

/**
 *
 */
public interface ProjectRepo2 extends PagingAndSortingRepository<Project, Long> ,JpaSpecificationExecutor<Project>  {
	@Query( value = " select p from Project p  where p.projectCategory=?1 and p.projectArea=?2 and p.id<=?3 " )  
	 @EntityGraph(attributePaths = { "projectPics" })
	 Page<Project> projectPageDataUp(String projectCategory,String projectArea,long max, Pageable pageable);

}
